hbase无法启动,The node /hbase is not in ZooKeeper
问题详细描述如下:
2016-12-09 15:10:39,160 ERROR [org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation] - The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
2016-12-09 15:10:39,264 ERROR [org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation] - The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch with the one configured in the master.
首先,说下我在哪个环节碰到过这个问题。
HBase Java API编程这一步。
伪分布模式下,如(djt002)
hbase-env.sh配置文档中的HBASE_MANAGES_ZK的默认值是true,它表示HBase使用自身自带的Zookeeper实例。
但是,该实例只能为单机或伪分布模式下的HBase提供服务。
当然,你也可以,在单击或伪分布模式下,使用外置安装的Zookeeper。
若是分布式模式,则需要配置自己的Zookeeper集群。如(HadoopMaster、HadoopSlave1、HadoopSlave2)
hbase-env.sh配置文档中的HBASE_MANAGES_ZK的默认值是true,它表示,分布式模式里,在启动HBase时,HBase将Zookeeper作为自身的一部分运行。进程变为HQuorumPeer。
hbase-env.sh配置文档中的HBASE_MANAGES_ZK的默认值是false,它表示,分布式模式里,需要,先提前手动,每个节点都手动启动Zookeeper,然后再在主节点上启动
HBase时,进程变为HMaster(HadoopMaster节点)。
问题的解决办法:
这个坑搞了很久
主要原因是独立安装的zookeeper并没有创建/znode
导致Hbase无法定位到默认的znode--- /hbase
解决方法:
运行zookeeper:./zkCli.sh
创建znode: create /hbase myhbase
现在重启hbase ,hmaster和regionserver正常启动
但是hbase shell出现bug
若,还出现如下问题的话,则
这可能是hostname出现问题
解决方案:
修改/etc/hostname 将主机名设置正确
作者:大数据和人工智能躺过的坑
出处:http://www.cnblogs.com/zlslch/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文链接,否则保留追究法律责任的权利。
如果您认为这篇文章还不错或者有所收获,您可以通过右边的“打赏”功能 打赏我一杯咖啡【物质支持】,也可以点击右下角的【好文要顶】按钮【精神支持】,因为这两种支持都是我继续写作,分享的最大动力!